package design.a2_builder.worker;


import design.a2_builder.product.Computer;

/**
 * 指挥者，相当于经理，去指挥哪个工人，完成产品的创建
 */
public class Director {

	private Builder builder;

	public Director(Builder builder) {
		this.builder = builder;
	}

	//产品构建与组装方法
	public Computer construct() {
		builder.buildScreen();
		builder.buildMouse();
		builder.buildKeyboard();
		return builder.getResult();
	}
}
